//	 ID : pallab81
// 	PROG : 10702
// 	LANG : C++
// 	2011-10-13-12.04.46 Thursday
//
// 	"I have not failed, I have just found 10000 ways that won't work.
//


#include <iostream>
#include <algorithm>
#include <vector>
#include <sstream>
#include <fstream>
#include <string>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <functional>
#include <bitset>

#include <ctime>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <climits>
#include <cstring>

using namespace std;

#define fo(i,ed) for(int i = 0 ; i < ed ; ++i )
#define foit(i, x) for (typeof((x).begin()) i = (x).begin(); i != (x).end(); i++)
#define bip system("pause")
#define Int long long
#define pb push_back
#define SZ(X) (int)(X).size()
#define LN(X) (int)(X).length()
#define mk make_pair
#define f first
#define s second
#define SET( ARRAY , VALUE ) memset( ARRAY , VALUE , sizeof(ARRAY) )

inline void wait( double seconds ){
    double endtime = clock()+( seconds* CLOCKS_PER_SEC );
    while( clock() < endtime ){
        ;
    }
}

int ncity,S,nend,K;
int G[105][105];
int end_city[105];
Int dp[ 105 ][ 1005 ];
inline void Read(){
    for(int i=1;i<=ncity;++i){
        for(int j=1;j<=ncity;++j){
            scanf("%d",&G[i][j]);
        }
    }
    int x;
    SET(end_city,-1);
    fo(i,nend){
        scanf("%d",&x);
        end_city[x]=1;
    }
}

inline Int go(int cur_city, int tour){
    if( tour==0 ){
        if( end_city[ cur_city ]==1 ){
            return 0;
        }
        return (Int)-1023456789;
    }

    Int &best = dp[ cur_city ][ tour ];
    if( best!=-1 ){
        return best;
    }

    best = (Int)0;
    for(int i=1;i<=ncity;++i){
        if( cur_city!=i ){
            Int var = G[cur_city][i] + go( i , tour-1 );
            best = max( best, var );
        }
    }

return best;
}
inline void Proc(){
    SET(dp,-1);
    Int var = go(S,K);

    cout<< ( var<0 ? 0 : var ) <<"\n";

}

int main(){
	#ifndef ONLINE_JUDGE
		freopen("in","rt",stdin);
	#endif

    while( scanf("%d %d %d %d",&ncity,&S,&nend,&K)==4 ){
        if( ncity==0 && S==0 && nend==0 && K==0 )break;
        Read();
        Proc();
    }


return 0;
}
